package com.example.sample.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.app.BaseActivity;

import net.liteheaven.xblib.common.ui.ToastUtil;

/**
 * Created by liangy on 2016/10/14.
 */
public class FragmentProblem2Activity extends BaseActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Button button = new Button(this);
        button.setText("返回");
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(FragmentProblem2Activity.this, FragmentProblemActivity.class);
                startActivity(intent);
            }
        });
        setContentView(button);
        String arg = getIntent().getStringExtra("arg");
        ToastUtil.show(this, "上个界面传过来的内容是：" + arg);
    }
}
